home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / kms20src.lha / KMSXPR / xprglue.s < prev    next >
Text File  |  1994-04-21  |  2KB  |  206 lines

  1. ;XPRGlue.s
  2. ;
  3. ;   DESCRIPTION:
  4. ;
  5. ;    This is an interface to XPR callback functions to be handed to
  6. ;    external protocol libraries.
  7. ;
  8. ;   AUTHOR/DATE:  Pasi Ojala 1992
  9. ;
  10. ;;;
  11.  
  12. setup    macro
  13.     movem.l    d2-d7/a2-a6,-(sp)
  14.     endm
  15.  
  16. push    macro
  17.     move.l    \1,-(sp)
  18.     endm
  19.  
  20. fix    macro
  21.     ifc    '\1',''
  22.         mexit
  23.     endc
  24.     ifle    \1-8
  25.         addq.l    #\1,sp
  26.     endc
  27.     ifgt    \1-8
  28.         lea    \1(sp),sp
  29.     endc
  30.     endm
  31.  
  32. restore    macro
  33.     fix    \1
  34.     movem.l    (sp)+,d2-d7/a2-a6
  35.     rts
  36.     endm
  37.  
  38.     public    _a_fopen
  39.     public    _c_fopen
  40.     public    _a_fclose
  41.     public    _c_fclose
  42.     public    _a_fread
  43.     public    _c_fread
  44.     public    _a_fwrite
  45.     public    _c_fwrite
  46.     public    _a_fseek
  47.     public    _c_fseek
  48.     public    _a_sread
  49.     public    _c_sread
  50.     public    _a_swrite
  51.     public    _c_swrite
  52.     public    _a_update
  53.     public    _c_update
  54.     public    _a_chkabort
  55.     public    _c_chkabort
  56.     public    _a_chkmisc
  57.     public    _c_chkmisc
  58.     public    _a_gets
  59.     public    _c_gets
  60.     public    _a_setserial
  61.     public    _c_setserial
  62.     public    _a_ffirst
  63.     public    _c_ffirst
  64.     public    _a_fnext
  65.     public    _c_fnext
  66.     public    _a_finfo
  67.     public    _c_finfo
  68.     public    _a_sflush
  69.     public    _c_sflush
  70.     public  _a_options
  71.     public    _c_options
  72.     public  _a_unlink
  73.     public    _c_unlink
  74.     public  _a_squery
  75.     public    _c_squery
  76.  
  77. _a_fopen:
  78.     setup
  79.     push    a1
  80.     push    a0
  81.     jsr    _c_fopen
  82.     restore    8
  83.  
  84. _a_fclose:
  85.     setup
  86.     push    a0
  87.     jsr    _c_fclose
  88.     restore    4
  89.  
  90. _a_fread:
  91.     setup
  92.     push    a1
  93.     push    d1
  94.     push    d0
  95.     push    a0
  96.     jsr    _c_fread
  97.     restore    16
  98.  
  99. _a_fwrite:
  100.     setup
  101.     push    a1
  102.     push    d1
  103.     push    d0
  104.     push    a0
  105.     jsr    _c_fwrite
  106.     restore    16
  107.  
  108. _a_fseek:
  109.     setup
  110.     push    d1
  111.     push    d0
  112.     push    a0
  113.     jsr    _c_fseek
  114.     restore    12
  115.  
  116. _a_sread:
  117.     setup
  118.     push    d1
  119.     push    d0
  120.     push    a0
  121.     jsr    _c_sread
  122.     restore    12
  123.  
  124. _a_swrite:
  125.     setup
  126.     push    d0
  127.     push    a0
  128.     jsr    _c_swrite
  129.     restore    8
  130.  
  131. _a_update:
  132.     setup
  133.     push    a0
  134.     jsr    _c_update
  135.     restore    4
  136.  
  137. _a_chkabort:
  138.     setup
  139.     jsr    _c_chkabort
  140.     restore
  141.  
  142. _a_chkmisc:
  143.     setup
  144.     jsr    _c_chkmisc
  145.     restore
  146.  
  147. _a_gets:
  148.     setup
  149.     push    a1
  150.     push    a0
  151.     jsr    _c_gets
  152.     restore    8
  153.  
  154. _a_ffirst
  155.     setup
  156.     push    a1
  157.     push    a0
  158.     jsr    _c_ffirst
  159.     restore    8
  160.  
  161. _a_fnext
  162.     setup
  163.     push    a1
  164.     push    a0
  165.     push    d0
  166.     jsr    _c_fnext
  167.     restore    12
  168.  
  169. _a_sflush
  170.     setup
  171.     jsr    _c_sflush
  172.     restore
  173.  
  174. _a_setserial
  175.     setup
  176.     push    d0
  177.     jsr    _c_setserial
  178.     restore    4
  179.  
  180. _a_finfo
  181.     setup
  182.     push    d0
  183.     push    a0
  184.     jsr    _c_finfo
  185.     restore    8
  186.  
  187. _a_options
  188.     setup
  189.     push    a0
  190.     push    d0
  191.     jsr    _c_options
  192.     restore 8
  193.  
  194. _a_unlink
  195.     setup
  196.     push    a0
  197.     jsr    _c_unlink
  198.     restore 4
  199.  
  200. _a_squery
  201.     setup
  202.     jsr    _c_squery
  203.     restore
  204.  
  205.     end
  206.